package com.dpad.telematicsclientapp.adapter

import android.content.Context
import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

import com.dpad.telematicsclientapp.android.R
import com.dpad.telematicsclientapp.mvp.imageloader.ILFactory
import com.dpad.telematicsclientapp.netlibrary.newapp.entity.HomeBean
import com.dpad.telematicsclientapp.util.utils.ImgUtil

/**
 * ================================================
 * 作    者：wenbody
 * 版    本：1.0
 * 创建日期：2019/12/24 17:30
 * 描    述：
 * 修订历史：
 * ================================================
 */
class BottomShowCarAdapter(data: List<HomeBean.CarData>) : BaseQuickAdapter<HomeBean.CarData, BaseViewHolder>(R.layout.item_little_car, data) {

    override fun convert(helper: BaseViewHolder, item: HomeBean.CarData) {
        if (item.check) {
            helper.setVisible(R.id.underIm, true)
        } else {
            helper.setVisible(R.id.underIm, false)
        }
        ILFactory.getLoader().loadNet(helper.getView<ImageView>(R.id.littleCarIm), item.imgUrl, ImgUtil.getOptions(R.mipmap.car_default_icon,R.mipmap.xzcx_little1))

//        helper.getView<ImageView>(R.id.littleCarIm).setImageResource(item.imageId)
    }

}